﻿using SUNRPA.CONTROLS.IMPL.domain.flowRunningVar;
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Input;

namespace RPAVIEW.views.controlLibrary {
    /// <summary>
    /// VarTreeWindow.xaml 的交互逻辑
    /// </summary>
    public partial class ClearableTextBox:UserControl {
        public static readonly DependencyProperty text = DependencyProperty.Register(
            "Text",
            typeof(string),
            typeof(ClearableTextBox),
            new FrameworkPropertyMetadata(string.Empty, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault | FrameworkPropertyMetadataOptions.Journal));
        public string Text{
            get { return (string)GetValue(text);}
            set { SetValue(text, value);}
        }

        public Binding TextBind{
            set { 
                this.SetBinding(text, value); 
            }
        }

        public ClearableTextBox() {
            InitializeComponent();
        }

        private void ClearText(object sender, RoutedEventArgs e) {
            this.Text = "";
        }
    }
}
